using System;

namespace Microsoft.WowAddonStudio.FrameXml.Serialization.Attributes
{
    [AttributeUsage(AttributeTargets.Property, Inherited = false, AllowMultiple = false)]
    public sealed class ControlSelectorAttribute : Attribute
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ControlSelectorAttribute"/> class.
        /// </summary>
        public ControlSelectorAttribute():this(false)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="ControlSelectorAttribute"/> class.
        /// </summary>
        /// <param name="showAll">if set to <c>true</c> [show all].</param>
        public ControlSelectorAttribute(bool showAll)
        {
            ShowAll = showAll;
        }

        /// <summary>
        /// Gets or sets a value indicating whether [show all].
        /// </summary>
        /// <value><c>true</c> if [show all]; otherwise, <c>false</c>.</value>
        public bool ShowAll { get; set; }


        /// <summary>
        /// Returns a <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
        /// </summary>
        /// <returns>
        /// A <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
        /// </returns>
        public override string ToString()
        {
            return String.Concat("ControlSelectorAttribute, ShowAll: ", ShowAll);
        }
    }
}